<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
    <h1>登录</h1>
    <div th:if="${param.failed}"><span th:text="${session.SPRING_SECURITY_LAST_EXCEPTION.message}"></span></div>

    <form th:action="@{/login}" method="post">
        <div>
            <!--name必须为“username"-->
            <input type="text" name="username" placeholder="用户名"/>
        </div>
        <div>
            <!--name必须为"password"-->
            <input type="password" name="password" placeholder="密码"/>
        </div>
        <input type="submit" value="登录"/>
    </form>
</div>
</body>
</html>